package com.jeejam.product.service;

import java.util.List;

import com.jeejam.framework.base.pojo.TreePager;
import com.jeejam.framework.base.service.BaseService;
import com.jeejam.product.pojo.Category;

public interface CategoryService extends BaseService {
	
	public List<Category> selectRoot();
	
	public List<Category> selectRootWithoutChildren();
	
	public List<Category> selectRootByPage(int page, int pageSize);
	
	public List<Category> selectChildren(int catId);
	
	public List<Category> selectSubChildren(int parentId);
	
	public TreePager getTreePager(int currentPage, int pageSize);
	
	public int countsWithRoot();
	
	public void deleteWithChildren(int id);
	
	public List<Category> showIndex();
	
	/**
	 * 根据当前分类ID查找父分类及父分类下的所有分类
	 * @param catId
	 * @return
	 */
	public Category selectRootByCategoryId(int catId);
}
